import { request } from "../request";
import { ADMINAPI } from "../const";

export function getLogisticsList() {
  return request({
    url: `${ADMINAPI}/logistics/list`,
  });
}

export function addLogistics(data) {
  return request({
    url: `${ADMINAPI}/logistics`,
    method: "post",
    data,
  });
}

export function deleteLogistics(id) {
  return request({
    url: `${ADMINAPI}/logistics/${id}`,
    method: "delete",
  });
}

export function updateLogistics(data) {
  return request({
    url: `${ADMINAPI}/logistics/${data.id}`,
    method: "put",
  });
}
